/*
 * ListExpressionAst.h
 *
 *  Created on: 8 Nov 2010
 *      Author: kn308
 */

#ifndef LISTEXPRESSIONAST_H_
#define LISTEXPRESSIONAST_H_

#include <vector>
#include <iostream>
#include <MAlice/Ast/ExpressionAst.h>

namespace MAlice
{

class ListAst: public MAlice::ExpressionAst
{
private:
	vector<Ast*> mChildren;
public:
	ListAst(location loc);
	ListAst(location loc, Ast* child);
	ListAst(location loc, const vector<Ast*>& children);

	virtual ~ListAst();

	virtual llvm::Value* generate();

	inline vector<Ast*>& getChildren()
	{
		return mChildren;
	}

	ListAst* adoptFirst(Ast* child);
	ListAst* adopt(Ast* child);
};

}

#endif /* ListAst_H_ */
